/*
============================================================================
 Name        : BlockLogin.h
 Author      : \x{738b}\x{658c}
 Version     :
 Copyright   : \x{76ca}\x{76df}\x{8f6f}\x{4ef6}
 Description : CBlockLogin declaration
============================================================================
*/

#ifndef BlockLogin_H
#define BlockLogin_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
// CLASS DECLARATION
class CSingleLineTextInput;
class CCheckBox;
class CControl;

const TInt KMenuIdLogin = 0;
const TInt KMenuIdGetPasswd = 1;

/**
*  CBlockLogin
* 
*/
class CBlockLogin : public CBlock
{
public:
	~CBlockLogin();

	static CBlockLogin* NewL(CBaseBlock* bsBack , const TInt& nType);

	static CBlockLogin* NewLC(CBaseBlock* bsBack , const TInt& nType);

	CBlockLogin(CBaseBlock* bsBack , const TInt& nType);

private:
	void ConstructL();

public:
	void OnDraw(CFbsBitGc& g) const;

	TBool OnMenuEvent(TInt menuId);

	void OnKeyEvent(const TInt& keyCode);
	
	void SizeChanged();

	void OnMouseUp(const TPoint& aPt);

	void DrawTitle(CFbsBitGc& g, TRect aRect, TInt aBaseLine) const;

	void OnInput(const TDesC8& strInput);

private:
	TInt m_nType; // 0:BlockLogin 1:register
	TInt m_nCurrent;
	CSingleLineTextInput* m_inputphone;
	CSingleLineTextInput* m_inputpw;
	CCheckBox*			  m_checkbox;
	CControl* m_Ctrls[3];
	CDesCArray* m_strArray;
};

#endif // BlockLogin_H
